home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / NeXT / Tree0.5 / treeobj / TreeView.h < prev    next >
Encoding:
Text File  |  1992-05-16  |  1.7 KB  |  49 lines

  1. /* TreeView.h - Copyright 1992  Steve Ludtke  All Rights Reserved      */
  2.  
  3. #import <appkit/View.h>
  4. #import <stdlib.h>
  5. #import "gopher.h"
  6.  
  7. @interface TreeView:View
  8. {
  9.     id                  object;        /* points to the GopherObj */
  10.     float               bgColor;    /* background color */
  11.     float               fgColor;    /* foreground color */
  12.     float               chi, theta;    /* current view angle */
  13.     float               dx, dy, dz, dr, dc;    /* x,y,z,R,chi velocities */
  14.     float               path[3004], bbox[4];    /* storage for line drawing */
  15.     char                com[1502];
  16.     int                 pathc;        /* line counter */
  17.     float               xfm[9], yas, xsca; /* variables for 3d xform */
  18.     float         zsca, xof, zof;
  19.     char                dtype;        /* display type 0 or 1 (planar or 3d) */
  20.     float               myx, myy, myz;  /* my current location in 3 space */
  21.     Root               *top;        /* points to top of web */
  22.  
  23. }
  24.  
  25. - initFrame:(NXRect *)myrect;
  26.  
  27. /* methods required by GohperObj */
  28.     -start:(Root *) Ptop :Pobject :(char *)path;
  29.     -step:(Branch *) myloc;
  30.     -refresh:(Branch *) myloc :(int)speed;
  31.     -(char *)help:window :browser;
  32.     -preferences:sender;
  33.     -drawSelf:(NXRect *)rects :(int)rectCount;
  34.  
  35. /* misc drawing methods */
  36.     -lookAt:(float)x y:(float)y z:(float)z;
  37.     -setView:(float)az alt:(float)alt aov:(float)aov;
  38.     -add_dot:(float)x :(float)y :(float)z;
  39.     -addline:(float)x1 :(float)y1 :(float)x2 :(float)y2;
  40.     -addline:(float)x1 :(float)y1 :(float)z1 :(float)x2 :(float)y2 :(float)z2;
  41.     -Draw:(Branch *) top :(float)x :(float)y :(float)z :(int)f;
  42.  
  43. /* keyboard io methods */
  44.     -(BOOL)acceptsFirstResponder;
  45.     -keyDown:(NXEvent *)event;
  46.     -keyUp:(NXEvent *)event;
  47.  
  48.     @end
  49.